Python用fastapi来建立异步的web服务器

from fastapi import FastAPI
import uvicorn
app = FastAPI()
@app.get("/")
async def root():
    return {"message": "Hello"}
if __name__ == "__main__":
    uvicorn.run(app, host="0.0.0.0", port=8080)